somewhere near the beginning.

Optimization and Armstrong modulation

Filed under: Mathematics, Programming — Alex @ 12:06 am 11/15/2005

I generally don’t have the level of interest required to sit down and read a huge treatise on optimization. That eliminates just about all the optimization books I’ve seen. Someday, in graduate school, I hope to take a series of classes that will open up that world to me, but until then, I’ll have to resort to ad hoc solutions.

In my latest telecomm homework assignment, we had to design an indirect Armstrong FM modulator— a device used to create wideband FM signals. The problem is that it involves a variable number of frequency multiplication steps, with a frequency mixing somewhere in the middle of the process. I must determine, among other things, the number of frequency doublings p and triplings q to do before mixing, what frequency to mix at f_s, and how many frequency doublings and triplings to do after mixing (n and m). If you consider it as a system to be optimized, there are 6 parameters to be optimized, five of which are related by the equation 2^{p+n}3^{q+m} - \left(\frac{f_s}{f_0}\right)2^n3^m = \frac{f_f}{f_0}. The other is a frequency deviation parameter \delta_{f_0} which I’d like to satisfy the equation  \delta_f = \delta_{f_0} 2^{p+n}3^{q+m}.

The interesting thing about this problem is the fact that p,q,n,m have to be positive integers, and \delta_{f_0}, f_s have to be within certain ranges. I ended up coding this up in Python: the program accepts the two continuous variables as input, and steps through the discrete ones to find optimal values. The engineer in me was satisfied with the results, but I wonder what kind of theories out there address problems like that. The mathematician in me would like to be able to find a provably optimal, acceptable solution.

Since I’m sure someone will ask me about this question tomorrow, I’ve attached it

[python]
import math

“”" Really crappy program to help design an indirect Armstrong FM modulator. Given some
parameters, tells you p,q,n,m coefficients for cascaded frequency doublers and triplers.
(p, q) are for the numbers of (doubling, tripling) before frequency conversion,
(n,m) are for the number after. Parameters:
df0 - freq deviation of input [Hz]
fs - frequency of oscillator used for frequency mixing [kHz]
ff - output frequency desired [kHz]
dff- output frequency deviation desired [Hz]
f0 - frequency of input oscillator [kHz]
maxexp - range of values to try for p,q,n,m (higher = longer, but probably pointless, run)
“”"

df0 = 9
fs = 10.6*1000.
ff = 88.7*1000.
dff = 75*1000.
f0 = 120.
maxexp = 10

def freqdiff(p, q, n, m):
return ((f0*2**(p+n)*3**(q+m) - fs*2**n*3**m) - ff)/1000

def devdiff(p,q,n,m):
return (dff - 2**(p+n)*3**(q+m)*df0)/dff

def optimizearmstrong():
oldval = 200^2
for p in range(maxexp):
print “testing p=”, p
for q in range(maxexp):
for n in range(maxexp):
for m in range(maxexp):
newval = freqdiff(p, q, n, m)**2 + devdiff(p, q, n, m)**2
if math.sqrt(newval) < math.sqrt(oldval):
oldval = newval
oldp = p
oldq = q
oldn =n
oldm = m
print "p=", oldp, "q=", oldq, "n=", oldn, "m=", oldm
print "freq [MHz]=", (f0*2**(oldp+oldn)*3**(oldq+oldm) - fs*2**oldn*3**oldm)/1000, \
"dev [kHz]=", 2**(oldp+oldn)*3**(oldq+oldm)*df0/1000

optimizearmstrong()
[/python]

Possibly relevant posts:

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment