Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

H bridge, PWM frequency, sampling time and aliasing

Status
Not open for further replies.

ericchee

New Member
Frequency for PWM is 2.4kHz and sampling time is 15ms. The motor is drove for positioning and angle is measured and sampled. Sensor used is an incremental rotary encoder. My question is: Do frequency aliasing happen? 15ms => 66.67Hz and formula for aliasing is fsampling > 2fsignal. 2.4kHz X 2 = 4.8kHz. since fsampling < fsignal then aliasing is happening. Am i correct with this?

I am doing PID control for inverted pendulum. my setpoint is 90 degree. Starting at 37s, integral is taking over as the error become significantly small. The control signal is decreasing smoothly until 39.5s and the motor jerks. the jerk happens again at 43.5s but this time the error become negative and control signal increases. Instead of jerking, i wanted the motor move slowly to sp. I am not sure whether the problem lies in my controller or driver. If i assume driver, which area should i look into?

My driver can be refer here:
 

Attachments

  • graph.JPG
    graph.JPG
    60.8 KB · Views: 190
Aliasing occurs when the sample frequency is less than twice the signal frequency as you stated. But 2.4KHz is not your signal frequency, it is simply the modulating frequency for the motor drive. You signal frequency is whatever the loop response frequency is, which you have not given. This is determined by the dynamics of the loop. With a 66.64Hz sample time, the maximum loop dynamic frequency would have to be less than 33.32Hz to avoid aliasing.

I suspect your loop control problem is incorrect values for the loop controller PID parameters.
 
hi crutscrow,

thank you for quick reply. i am not sure how to find the frequency of the loop. I am using ziegler nichols method to get the PID gains.

rgds,
eric
 
from what i get from net, to set the loop frequency, i have to draw bode plot and shift the required frequency to zero gain. If this is the case, i should design my gain instead of using ziegler nichols.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top