Match n Freq (tm): Finds optimal pole-zero locations to minimize intersymbol interference
Match-n-Freq (tm): Pulse shaping or any Passive filter design program that finds the pole-zero locations of a transfer function H(s) for a matched filter. H(s) equals a -desired- signal (Yout) divided by a given input signal (Yin). Both Yout and Yin are functions of frequency (not time). This is an example of how Automatic Differentiation does simpify problem solving.
Group delay may also be tweaked to compliment a given data set, thus, providing a flat group delay.
Equal Ripple sidelobes is also possible with this Match-n-Freq (tm) software.
Minimizing Intersymbol Interference in a read/write channel for disc drives by shaping and slimming an isolated readback pulse was the main objective for writing this matched filter program. For more info, see Kost, R. and P. Brubaker; 'Arbitrary equalization with simple LC structures';IEEE Transactions on Magnetics, Nov. 1981, pp 3346-3348.
Anyone seeking an Online math tutor?
I specialize in solving Differential Equations (DEs) or systems. DEs may be explicit or implicit. There is an App, ODEcalc, on my website that is free and may be of help solving an ODE for you.
Phil Brubaker tutors Differential Equations and other App usage or modification of my AppsOnLine via Zoom from Roseburg, OR. He has a Bachelor degree in Math with a Minor in Electrical Engineering. Tutoring fee is $10/h. Contact Phil now!
The original matched filter problem was 'solved' in hours! Years of testing hardware designs and modifying design requirements/goals finally produced present program logic. All those minus signs in the transfer function gave me many white hairs! At last, in 2023 Group Delay equations were found to be in error and were corrected. New results show pole-zero locations as expected and hoped for. Give it a try and see how it does for your problem:)
Pole Removal capabilities have been added to version 6.8 that should be helpful to manufacturing departments. Adding a minus sign to REAL pole values will HOLD / freeze the pole location. The values may be what ever the user chooses. See some demo files for good examples.
Match-n-Freq was made possible due to the FortranCalculus compiler. The source code is relatively short (7 pages + 11 input/output pages) showing the FortranCalculus programming simplicity. Sometimes Match-n-Freq has three nested solvers in execution at once. Match-n-Freq is a free (4 MB) download.
Match n Freq 6.81Output Plots:
(Click Any Image To Enlarge)
Pole/Zero Constellation
Mainlobe Transfer Function
Sidelobes
On this page, I will attempt to guide you through the various routines in order to create a 'picture' for you to understand what's going on. First, the code required and then a sample of output summary.
1. Introduce the Find statement that is used to tweak variables until ones objective(s) are met. The variables may have bounds and constraints that restrick where the selected solver may search for an Optimal solution.
! Find statement is key to tweak variables AND obtain an Optimal
! (i.e., Maximum / Minimum) solutions.
FIND gain, Yzero, Preal, Pimag; ! variable list of those to tweak!
in fitboth; by Jove; ! Jove is the solver for this problem
with lower h8low; and uppers h8hi; ! lower & upper bounds
Holding circleUp, PoleWide, HoldZero, ZeroWide; ! constraints
TO MINIMIZE errsum ! objective Minimize errSum variable!
2. This is a sample of code necessary to solve this problem, but hope it gives you an idea what is going on. Variables to tweak (e.g. gain) MUST always be on the rightside of an equal sign; so the solver can change a value when it wants too. Follow gain variable throughout the code for seeing what is required. Plus, see gain and other tweaked variables in output section.
model fitboth
include 'freq68.inc'
C ... Zero limits ... >= 0
do 20 j = 1, nYzero
20 holdZero(j) = (Yzero-Zbottom)
if( nZpairs + nZquads .gt. 0) then
do 22 j = nYzero+1, nYzero + nZpairs + nZquads
ZeroWide(j) = (fnorm - Zimag(j))
22 holdZero(j) = (Zreal(j)-Zbottom) * (Xlmax - Zimag(j))
endif
C ... Pole limits ... >= 0
if( nYpole .gt. 0) then
do 30 j = 1, nYpole
PoleWide(j) = (fnorm - Ypole)
30 circleUp(j) = circle( Ypole, 0, radius)
endif
if( nPpairs .gt. 0) then
do 32 j = 1, nPpairs
PoleWide(j+nYpole) = (fnorm - Pimag(j))
32 circleUp(j+nYpole) = circle( Preal(j), Pimag(j), radius)
endif
call transfer ! calc. 'errMag' error
call Gdelay ! calc. 'rip8sq' error
errMag = 1D10 * errMag * wt8magn
errsum = errMag + rip8sq * 10 ! errSum, is it decreasing in amplitude?
end
Fmodel circle( Vreal, Vimag, radius) ! constrain Vreal & Vimag to within radius?
circle = radius - sqrt(Vreal**2 + Vimag**2)
end
model transfer
include 'freq68.inc'
errMag = 0.
do 50 ii = 1, npoints ! --- CALCULATE TRANSFER FUNCTION ----
F = freq( ii): Hw = Hs( F)
error( ii) = Hw * y8in( ii) - y8out( ii) ! Absolute Error
error( ii) = error( ii) * (y8out( ii)**2) ! Relative
errMag = errMag + error( ii)**2
50 continue
end
Fmodel Hs( F)
include 'freq68.inc'
real*8 num
F2 = F * F: num = 1 : den = 1
if( nYpole + nYpoleHo .gt. 0) den = factor( F2, -Ypole, 0.)
if( nPholds .gt. 0) then
do 20 ij = 1, nPholds
den = den * factor( F2, -PrealH( ij), PimagH( ij))
20 continue
endif
if( nPpairs .gt. 0) then
do 24 ij = 1, nPpairs
den = den * factor( F2, -Preal( ij), Pimag( ij))
24 continue
endif
if( nYzero .gt. 0) then
num = num * factor( F2, -Yzero, 0.)
if( doublet .gt. 0) num = num**2
if( lossless .gt. 0) num = num**2
endif
if( nXzeros .gt. 0) then
num = 100 * num
do 40 ij = 1, nXzeros
num = num * factor( F2, 0., Xzeros(ij))
40 continue
endif
if( nZpairs .gt. 0) then
do 60 ij = 1, nZpairs
num = num * factor( F2, -Zreal(ij), Zimag( ij))
60 continue
endif
n = nZpairs
if( nZquads .gt. 0) then
do 80 ij = 1, nZquads
n = n + 1
num = num * factor( F2, Zreal( n), Zimag( n))
num = num * factor( F2, -Zreal( n), Zimag( n))
80 continue
endif
q = gain * sqrt( abs(num / den))
if( q .gt. 1.D20) q = 1.D20
Hs = q
end
Fmodel factor( F2, sigma, omega)
r2 = sigma**2
if( omega .eq. 0.D0) then
factor = 1. : if( sigma .eq. 0.D0) return ! not sure on value
factor = (r2 - F2) / 10 ! '10' normalizing factor
return
endif
o2 = omega**2 : sum = (r2 + o2 - F2) / 10
temp = sum*sum + 4*F2*r2/100 : factor = 0
if( temp .eq. 0.D0) return
temp = sqrt( temp)
factor = temp / (r2 + o2) ! this R2+O2 is 4 normalizing pole values
end
ooo ! and adjusts Gain value for system.
3. The following block shows a sample of output from the JOVE solver. The first column lists the variables being tweaked; some variables are arrays. The next column, INITIAL, shows initial values for variables that gets things rolling. The next columns are the values for that iteration. This problem required 13 iterations to solve for an optimal solution. This is the most complicated problem I solved todate. Solution time was less than 4 minute on a 5-year old PC.
Are you ready to give it a try? First step is to download our free Calculus (Level) Compiler (i.e., FC-Compiler), install it, and run some Demo (example) files. Next, copy another (Demo) file and save it under another name in your 'user' folder. Edit this file with your equations and (math) models, then save it. Next, try executing it and see how it goes. Enjoy!
Match n Freq 6.81 Download (7 MB) Information:
Last Updated: Jan. 1, 2024 First Published: Nov. 16, 1992 License: free software! Edit source and create your own version. OS:Windows 98 or newer Requirements:Windows + Visual Basic 6.0 RunTime files Publisher:Optimal Designs Enterprise
Match n Freq 6.81
Click on right Link to Download Now
CurvFit: a curve fitting program with Lorentzian, Sine, Exponential and Power series are available models to match your data.
Match-n-Freq: a Matched Filter program used to filter signals and slim pulses.
Industry Problem-Solving Descriptions include:
Business Strategies & War Gaming: Buy, Sell, Hold options may be tested for an entire company, individual plant(s), or whole product lines. Imagine an increase in control settings from a 1 or 2 digits (i.e., a guess value) to an 8+ digit accuracy resulting from a Calculus programming calculation!
Voice Coil Motor: basically an electromagnetic transducer in which a coil placed in a magnetic pole gap experiences a force proportional to the current passing through the coil.
Electrical Filter Design: find the transfer function's poles & zeros; H(s) = Y_{out}(s) / Y_{in}(s).
AC Motor Design: a simulation program for A.C. motor design that was reapplied as a constrained optimization problem with 12 unknown parameters and 7 constraints.
PharmacoKinetics: an open-two- compartment model with first order absorption into elimination from central compartment is presented here.
Calculus (level) Problem-Solving for Engineers & Scientists