Optimizing PI Controller in PLL for Fast and Accurate Frequency Detection

In summary, you need to set the limits for the PI controller so that it has a fast response but still maintains accuracy when the input signal undergoes a step change.
  • #1
jegues
1,097
3
Hello,

I've written a program that executes the following control diagram.
?temp_hash=67556970add06a17d3dd42655fec6b52.png

Now I am trying to calculate the PI controller gains such that I can achieve a settling time of 0.06s and a damping factor of 1.

How can I do this?

I tried sketching a control diagram of the relevant portions.
?temp_hash=67556970add06a17d3dd42655fec6b52.png


Any suggestions/comments/advice would be greatly appreciated.

Thanks!
 

Attachments

  • pll.png
    pll.png
    15 KB · Views: 3,161
  • controldiag.png
    controldiag.png
    1.7 KB · Views: 1,670
Engineering news on Phys.org
  • #2
jegues said:
Any suggestions/comments/advice would be greatly appreciated.

In the latter diagram you are missing the feed-back loop ( from Theta(s) to Vq(s) ).
Use Masons rule to find the closed-loop transfer-function ( and the characteristic equation ) of the system.
Create root-curves, varying kp and ki using some computerprogram (CAD), until the characteristic roots fits your specifications.

Advice: Use z-transform instead of Laplace-transform, as z-transform calculates correctly despite discreet and time-delayed calculations.
 
  • #3
Hesch said:
In the latter diagram you are missing the feed-back loop ( from Theta(s) to Vq(s) ).
Use Masons rule to find the closed-loop transfer-function ( and the characteristic equation ) of the system.
Create root-curves, varying kp and ki using some computerprogram (CAD), until the characteristic roots fits your specifications.

Advice: Use z-transform instead of Laplace-transform, as z-transform calculates correctly despite discreet and time-delayed calculations.

Hi,

Below I've included a more detail diagram of the controls, and another sketch of the control diagram.

?temp_hash=a3558cc1a4096ae2f8daae5725e67fb7.png


If I can convert this into something similar to the diagram shown at the bottom of the figure, then I can do some analysis such as root locus or by using MATLAB to make a sensible choice for kp and ki given the constraints. But how can I get it into this form?

EDIT: I worked on writing down the equations for this control diagram and got the following,

[tex]\frac{1}{T Vnom s^{2} \left(T_{2} s + 1\right)} \left(\frac{\sqrt{2} G}{2} \left(ki + kp s\right) \left(T_{1} s + 1\right) \left({qv}' \sin{\left (\theta(s)) \right )} + {v}' \cos{\left (\theta(s)) \right )}\right) - T Vnom s^{2} \theta(s)) \left(T_{2} s + 1\right) + Vnom \omega s \left(T_{2} s + 1\right)\right) = 0[/tex]

but now I need to solve for the transfer function somehow.

Thanks!
 

Attachments

  • sphpll.png
    sphpll.png
    103.4 KB · Views: 1,664
Last edited:
  • #4
jegues said:
I can do some analysis such as root locus or by using MATLAB to make a sensible choice for kp and ki given the constraints. But how can I get it into this form?

I don't quit understand what you mean by "get into this form", but anyway:

In your diagram, drawn by hand, I can count about 1 zero and 3 poles (3. order system), and as such you must have 3 tuning-possibilities. You can add an extra zero in your controller, thereby having a PID-controller to comply with your specifications.

Generally having a control-loop with forward feed = A(s) and backward feed = B(s), Masons rule says that the transferfunction of the whole system will be:

y(s)/u(s) = A(s) / ( 1 + A(s)*B(s) )

Setting the denominator = 0, you have the characteristic equation, giving the characteric roots at different values of kp, ki, kd. Now keep two of the values fixed while varying the third (iteratively). It's a "cut and try" proces, which ( after some training ) can be done in 5 minutes.

Note: If your tuned system is not physically doing exactly as intended, the cause may be that you are using Laplace-transform instead of z-transform!
 
  • #5
Hello,

I've still been working on this problem for the past couple days and feel as though I've better expressed my concerns in the post below.

Let's start over.

Evening gents,

I wrote a program that executes the following control diagram. The contents of the orange box titled, "Orthogonal system generation" is shown in the lower part of the Figure as indicated by the black arrow.

http://forum.allaboutcircuits.com/attachments/pll-png.84178/?temp_hash=ce17ff051d9277ae54c53e5790ad0dfb

I did some analysis by hand to better understand how this control diagram works and have attached my scribbles, but I still have some unanswered questions.

  1. I've read in several other papers that the output of the PI controller is [tex]\Delta \omega[/tex]. In my analysis I found that the input error signal to the PI controller was, [tex]\epsilon = V_{m} ( \phi - \hat{\phi} )[/tex], and I cannot figure out how this becomes [tex]\Delta \omega[/tex] at the output. Any ideas?
  2. In the PI controller the output of the integrator in the integral path has a limiter at the output. What I'm confused about is how one should set these limits. Through experimentation with my program, I found that these limits will limit that amount of frequency deviation you allow in the output frequency signal [tex]\omega[/tex]. This in turn affects the speed of the response for the controller when the phase of the input signal given undergoes a step change. The more frequency deviation you allow (i.e. the larger your limits are) the faster the response of the controller (i.e. it will lock onto the phase of the signal faster). However, as a trade off for faster controller response, one observes more deviation in the frequency signal [tex]\omega[/tex]. Is there a way I can do some analysis to robustly determine how these limits affect the performance of the controller? Some guidance is all I'm asking for.
Thanks for all your help!
 
  • #6
what is in the block that ouputs Vq
 
  • #7
  • #8
donpacino said:
What kind of bandwidth do you need. how much jitter is acceptable

I've guessed that the application could be speed-control of a sensorless ac-motor.
 
  • #9
Hi Don and Hesch!

It seems I didn't attached my hand written notes to my previous post, so I'll attach them now. Please see the attached pdf.

Also, the portion inside the block that outputs Vq is a Clarke to Park transform. It looks like this,

?temp_hash=2933140024e362c621a1ed0cb32f7469.png


I tried to write the program in a flexible way so that the user can vary different parameters based on their specific requirements. One example of this is allowing the user to enter a minimum, nominal and maximum frequency. This entered values would then be used to calculate the appropriate limits for the integral path in the PI controller.

One application could be for grid-connected inverter systems. These systems rely on accurate and fast detection of the phase angle, the amplitude and the frequency of utility voltage in order to guarantee the correct generation of the reference signals. (This is taken directly from the paper on which I based the program)

I'm still trying to figure out how the output of the PI controller becomes the change is frequency in rad/s, and any other insight on how to set the limits in the integral path.

Thanks!
 

Attachments

  • notes.pdf
    725.7 KB · Views: 312
  • ClarkeToPark.png
    ClarkeToPark.png
    3.8 KB · Views: 1,495
  • #10
jegues said:
One application could be for grid-connected inverter systems. These systems rely on accurate and fast detection of the phase angle, the amplitude and the frequency of utility voltage in order to guarantee the correct generation of the reference signals. (This is taken directly from the paper on which I based the program)

I'm still trying to figure out how the output of the PI controller becomes the change is frequency in rad/s, and any other insight on how to set the limits in the integral path.

An example for a setup for a synchrounous motor is given here:

https://www.google.dk/search?q=clark+park+transformation&tbm=isch&imgil=Kb6f1n2FpZxvcM%3A%3BUlBSuwc6axptyM%3Bhttp%253A%252F%252Felectronicdesign.com%252Fdsps%252Fmulti-level-approach-makes-understanding-motor-control-easier&source=iu&pf=m&fir=Kb6f1n2FpZxvcM%3A%2CUlBSuwc6axptyM%2C_&usg=__qD5fBTta-vEYv6NDGRIpBBE2sFI=&biw=1366&bih=635&ved=0CDkQyjc&ei=ih82Vfq_BcX5ygOh9YDQCA#imgrc=Kb6f1n2FpZxvcM%3A;UlBSuwc6axptyM;http%3A%2F%2Felectronicdesign.com%2Fcontent%2F14978%2F58851_fig_02.gif;http%3A%2F%2Felectronicdesign.com%2Fdsps%2Fmulti-level-approach-makes-understanding-motor-control-easier;450;448

The system is composed of two loops: a "d"-loop and a "q"-loop, controlling a "d"-current and a "q"-current. The "d"-current will yield no torque in the motor as the magnetic field in the rotor and stator will be in parallel ( therefore Isd is typical set to zero. The "q"-current will yield a torque as the magnetic fields will be perpendicular.
The third input (ω) must be synchronous with the motor-speed, otherwise the motor will "fall out". The motorspeed will increase if you set a high torque (high Iq).

I don't quite undrestand what you mean by "limits in the integral path". The integrator must be able to yield maximum voltage for the three phases of the motor. The purpose of the PI-filter is to reduce current current-error (and noise).

I will not recommend one controller for a grid of inverters/motors. It will never be stable/robust. To get one motor stable/robust, using Clark-Park is hard enough. The intension by Clark-Park is to spare a sensor (encoder). Using an encoder will make the system a hundred times more accurate/robust/stable.
 
Last edited:
  • #11
jegues said:
Hi Don and Hesch!

It seems I didn't attached my hand written notes to my previous post, so I'll attach them now. Please see the attached pdf.

Also, the portion inside the block that outputs Vq is a Clarke to Park transform. It looks like this,

?temp_hash=2933140024e362c621a1ed0cb32f7469.png


I tried to write the program in a flexible way so that the user can vary different parameters based on their specific requirements. One example of this is allowing the user to enter a minimum, nominal and maximum frequency. This entered values would then be used to calculate the appropriate limits for the integral path in the PI controller.

One application could be for grid-connected inverter systems. These systems rely on accurate and fast detection of the phase angle, the amplitude and the frequency of utility voltage in order to guarantee the correct generation of the reference signals. (This is taken directly from the paper on which I based the program)

I'm still trying to figure out how the output of the PI controller becomes the change is frequency in rad/s, and any other insight on how to set the limits in the integral path.

Thanks!
the units before and after a controller like that will be the same.

SO think about what Vq is. WHat does it represent. WHen will it be zero. when will it be at it's max?
 

Related to Optimizing PI Controller in PLL for Fast and Accurate Frequency Detection

1. What is a PI controller in PLL?

A PI controller in PLL (Phase-Locked Loop) is a type of feedback control system that is used to regulate the output frequency of an oscillator to match the desired input frequency. The PI controller uses both proportional and integral control actions to adjust the output of the oscillator, ensuring that it stays locked to the input frequency.

2. How does a PI controller work in PLL?

A PI controller in PLL works by continuously measuring the phase difference between the input and output signals of the oscillator. The proportional control action adjusts the output frequency based on the instantaneous phase error, while the integral control action adjusts the output based on the accumulated phase error over time. This combined action helps the PLL maintain a stable and accurate output frequency.

3. What are the key parameters to consider when tuning a PI controller in PLL?

The key parameters to consider when tuning a PI controller in PLL are the proportional gain (Kp), integral gain (Ki), and the bandwidth of the loop filter. Kp determines how quickly the controller responds to changes in the input frequency, while Ki affects the steady-state accuracy of the output. The bandwidth of the loop filter determines the maximum rate at which the controller can adjust the output frequency.

4. How do you determine the optimal values for Kp and Ki in a PI controller?

The optimal values for Kp and Ki in a PI controller can be determined through a process called loop shaping. This involves adjusting the values and observing the response of the PLL until the desired performance is achieved. It may also involve simulating the system using mathematical models to find the best combination of Kp and Ki for the desired response.

5. What are the consequences of using incorrect values for Kp and Ki in a PI controller?

Using incorrect values for Kp and Ki in a PI controller can lead to instability or poor performance of the PLL. If the values are too high, the controller may become overly sensitive and cause erratic behavior. If the values are too low, the controller may be too slow to respond to changes in the input frequency, resulting in poor frequency accuracy. It is important to carefully tune the PI controller to ensure optimal performance of the PLL.

Similar threads

Replies
4
Views
1K
  • Electrical Engineering
Replies
1
Views
6K
Replies
6
Views
4K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
  • Mechanical Engineering
Replies
6
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • STEM Academic Advising
Replies
6
Views
3K
  • Mechanical Engineering
Replies
1
Views
3K
  • General Discussion
Replies
11
Views
25K
Back
Top