- Servo motors controlled via PWM signals do not directly correspond to voltage values. You need to translate your PWM duty cycle to an equivalent input voltage.
- Check your servo motor's datasheet for the specific relationship between the PWM duty cycle and the angular position.
- For example: 0° corresponds to a certain minimum PWM width (e.g., 1 ms) and 180° corresponds to a maximum PWM width (e.g., 2 ms).
- Map this PWM range to a normalized voltage scale, such as -1 to 1, to align with the model's expectations.
- The “Controlled PWM Voltage” block in MATLAB allows you to model the PWM input by translating a reference voltage into a duty cycle.
- If you know the relationship between PWM pulse width and angular position, you can map this relationship to the reference voltage. You can refer to this documentation link for more information on this block: https://www.mathworks.com/help/releases/R2024a/sps/ref/controlledpwmvoltage.html
Parameter Estimation of a servo motor does not track well.
37 views (last 30 days)
Show older comments
Good evening,
I am doing a project where I need to model the characteristics of a servo motor. I have been following 'DC Servo Motor Parameter Estimation" example. Long story short I got a servo motor with position feedback and I ran tests to get a dataset for the motor by setting the position to 180° and 0° with a period of 1 second before each switch. I recorded that data and I tried using the parameter estimation tool from the example after removing their data, The output of the estimation does not match my wave form closely enough to use this model as a simulation model of the servo. What should I be doing. One thing I know is strange is matlab asks for voltage inputs but servos use PWM so I just assumed that -1 is equivalent to the servo PWM minimum which gives 0° and 1 is equivalent to the servo PWM maximum which gives 180°. Attached are waveform screenshots.
0 Comments
Accepted Answer
MULI
on 11 Dec 2024
I understand that you are facing challenges in accurately modelling the servo motor’s behaviour. The issue seems to be related to how PWM signals are handled in the model.
You can follow the below steps to address this issue:
These adjustments will improve the alignment between the simulated and actual behaviour, resulting in a more accurate servo motor model.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!