# Phase Locked Loop Gain Design- FM Demodulation

Say I am trying to demodulate a message up to 25kHz in frequency, with a peak frequency deviation of 75kHz and a carrier of 1MHz, implying a 200kHz bandwidth using carsons rule.

Would I design the transfer function of the loop (Output/Input) so that there is a 20dB/decade slope up to 25kHz* where I would want it to level off? Should this "level" point be unity gain?

While trying to develop the loop transfer function, I find it possible to end the 20dB/decade slope at 25kHz* and level out, but I find that it is impossible to design it so that the level out point is unity gain as well. In fact, I can never get unity gain anywhere near 25kHz*.

edit: This seems to be because I do not understand how to measure the Kvco constant. Is this constant controllable, or a natural element of the VCO? In derivations I find, it is treated as a separate entity than Av (the VCO carrier amplitude) and appears as a result of linearizing the PLL in most derivations.

If I can't control the value of this constant then it seems that I will never be able to achieve unity gain at the desired frequency as the rest of the constants (Ac,Av,Au,Kd) influence both the numerator and denominator of the transfer function, thus changing the frequency at which level gain occurs but not the magnitude of the gain itself.

edit2: Is the Kvco constant the frequency deviation in Hz/V? If this is the case, does it need to match the frequency deviation of the incoming FM modulated signal? I believe it would, in which case it becomes a fixed value. If it is a fixed value, does this not limit the design of the PLL? For example, in order to achieve unity gain at high frequencies, the numerator of the transfer function below seems to need to be 0.5 so that at very large values of s, the function essentially becomes 1. If this is the case, I can no longer change the bandwidth of the 20dB/decade region as it has become fixed if I want unity gain.

Here is my short Matlab simulation code for trying to design this transfer function:

%LOOP TF GAIN CALCULATION TESTING
%=================================
%75kHz Peak Frequency Deviation
%1MHz carrier
%Baseband message bandwidth ~= 25kHz
%Phase Detector LPF cutoff: 500kHz, 4th order butterworth
%===========================================================
%Set Constants for loop calculation:
kvco = 1; %VCO constant
Au = 150000; %Amplifier Gain
kd = 1; %Phase detector LPF filter gain up to cutoff of ~500kHz
Ac = 1; %FM Modulator Carrier Amplitude
Av = 1; %VCO carrier Amplitude
%=================================================================

Loop_Num = [Au*kd*Ac*Av 0]; %Numerator of Transfer Function
Loop_Dem = [0.5 Au*kd*Ac*Av*kvco]; %Denominator of Transfer Function

Loop_Transfer = tf(Loop_Num, Loop_Dem); %Create Transfer Function

figure(1)
bode(Loop_Transfer) %Plot


And this transfer function has been derived using the following PLL Design:

• What does the function tf() do? Is it something you've written, or is it from a Matlab library? What is much more useful at this stage of the process is a Bode plot of the loop gain, that is Loop_Num * Loop_Den, dB against log(frequency), as it gives you the closed loop bandwidth, allows you to see whether it's stable or not, and gives you the fidelity factors for how well it tracks in band and rejects out of band. – Neil_UK Jun 10 '18 at 6:05
• @Neil_UK I am fairly sure the author is talking about tf() - I have used it before myself. The transfer function he inputted seems to be: $$H(s) = \frac{A_uK_dA_cA_v\cdot s}{0.5\cdot s + A_uK_dA_cA_vK_{vco}}$$ – Sven B Jun 10 '18 at 7:41
• @Zearia - I think you need to take the tour and note the section near the top marked "Ask questions, get answers, no distractions". – Andy aka Jun 10 '18 at 9:20
• Have you used tf() before? Does it do what you expect with simpler arguments. Have you plotted the open loop Bode plot yet to see what's going on properly? – Neil_UK Jun 10 '18 at 9:41
• You just want unity gain for 25 kHz and not 50 kHz and if there is a slight tail-off such as 3 dB then that's fine because when bandwidths are specified there is an assumption of 3 dB reduction at the end points. I don't understand what your problem is really. – Andy aka Jun 10 '18 at 12:16