Mithrandir2008
New Member
Hi all!
It's been a while since I posted here.
I'm working on this project which involves controlling a antenna with a 2 axis servo motor. Practical considerations aside(I still don't have the actual values like weight of antenna etc. will probably get them next week so I'll update then), I've decided to model it first using MATLAB.
Thing is, I'm not very good at it. Using simulink, I managed to model the motor transfer function, from which I got the direct output in terms of radians. I'm comparing this with a reference signal(Will have to modify this as the desired position will depend on the signal recieved from the antenna).
Then, from the error generated, I would like to use a PWM block to control the servo.
Now here's the problem. I have NO idea how to model a PWM in MATLAB6. So any help here would be much appreciated.
There is also another issue here. When using a PWM controller there are 2 schemes which come to my mind either,
a) If the error is positive or negative (Reference-Actual) the servo rotates by a fixed amount, say 2 degrees(fixed pulse width), direction depending on +/- and waits for the next change
OR
b) The PWM generates a signal based on the error (variable pulse width)
The second may be faster but I'm unsure of the stability aspect. Time is not an issue here and preference is given to stability.
Thanks a Lot!
P.S: For the 2 axis part, the same system repeated twice will suffice hopefully.
It's been a while since I posted here.
I'm working on this project which involves controlling a antenna with a 2 axis servo motor. Practical considerations aside(I still don't have the actual values like weight of antenna etc. will probably get them next week so I'll update then), I've decided to model it first using MATLAB.
Thing is, I'm not very good at it. Using simulink, I managed to model the motor transfer function, from which I got the direct output in terms of radians. I'm comparing this with a reference signal(Will have to modify this as the desired position will depend on the signal recieved from the antenna).
Then, from the error generated, I would like to use a PWM block to control the servo.
Now here's the problem. I have NO idea how to model a PWM in MATLAB6. So any help here would be much appreciated.
There is also another issue here. When using a PWM controller there are 2 schemes which come to my mind either,
a) If the error is positive or negative (Reference-Actual) the servo rotates by a fixed amount, say 2 degrees(fixed pulse width), direction depending on +/- and waits for the next change
OR
b) The PWM generates a signal based on the error (variable pulse width)
The second may be faster but I'm unsure of the stability aspect. Time is not an issue here and preference is given to stability.
Thanks a Lot!
P.S: For the 2 axis part, the same system repeated twice will suffice hopefully.