Clear Filters
Clear Filters

Simulink of PWM-controlled dc motor

7 views (last 30 days)
Yueming
Yueming on 22 Sep 2017
Commented: Sebastian Castro on 25 Sep 2017
Hi,
I'm trying to make a simple simulation based on the example "PWM-Controlled DC Motor". It's bascially the same with the example plus an intertial module. I changed some parameters based on the dc motor datasheet. The result shows that the motor is not running, but there is motor current.
1. I don't know whether I could see the PWM signal through scope. It seems not working 2. There should be some parameter errors, but don't know how to tune or change the default parameters
Thank you very much!

Answers (2)

Sebastian Castro
Sebastian Castro on 22 Sep 2017
You need a Voltage Sensor block (connected in parallel). Then, the output of that block will connect to your PS-Simulink Converter > Scope.
I am not sure what "not working" means. Please give us more information. Could it be that you are getting zero torque, because your Torque Sensor block is connected in parallel with the motor instead of in series. Give that a look!
- Sebastian

Yueming
Yueming on 25 Sep 2017
Hi Sebastian,
Thank you very much for the suggestion!
After correcting the torque sensor, I get the following error:
An error occurred while running the simulation and the simulation was terminated Caused by: Failed to update switched linear model, due to system singularity in current configuration. ...Cannot solve for one or more variables, including dynamic variable derivatives: Time derivative of 'DC_Motor.inductor1.i_L' (Inductor current) Time derivative of 'DC_Motor.inertia1.w' (Rotational velocity) Time derivative of 'Inertia.w' (Rotational velocity) 'Current_Sensor.I' (I) 'Current_Sensor.i1' (Current) 'Current_Sensor.n.v' (Voltage) 'Current_Sensor.p.v' (Voltage) 'DC_Motor.elec2rot1.i' (Current) 'DC_Motor.elec2rot1.t' (Torque) 'DC_Motor.inductor1.i' (Current) 'DC_Motor.inductor1.p.v' (Voltage) 'DC_Motor.inductor1.v' (Voltage) 'DC_Motor.inertia1.t' (Torque) 'DC_Motor.node2.v' (Voltage) 'DC_Motor.p.v' (Voltage) 'DC_Motor.resistor1.i' (Current) 'DC_Motor.resistor1.n.v' (Voltage) 'DC_Motor.resistor1.p.v' (Voltage) 'DC_Motor.resistor1.v' (Voltage) 'H_Bridge.ENA.v' (Voltage) 'H_Bridge.i2' (Current (+ -> -)) 'H_Bridge.p2.v' (Voltage) 'Ideal_Torque_Sensor.T' (T) 'Ideal_Torque_Sensor.t' (Torque) 'Inertia.t' (Torque) 'Voltage_Sensor.V' (V) 'Voltage_Sensor.n.v' (Voltage) 'Voltage_Sensor.v1' (Voltage)
Equations of one or more components may be dependent or inconsistent. This can cause problems in transient initialization. Here is the set of components involved: 'PWM_DCmotor/H-Bridge' Equation location is: 'C:\MATLAB\R2016b\toolbox\physmod\elec\elec\+elec\+actuators\+drivers\h_bridge.sscp' (no line number info)
'PWM_DCmotor/Voltage Sensor' Equation location is: 'C:\MATLAB\R2016b\toolbox\physmod\simscape\library\m\+foundation\+electrical\+sensors\voltage.ssc' (line 33)
  1 Comment
Sebastian Castro
Sebastian Castro on 25 Sep 2017
Yes, because both the Voltage sensor is connected incorrectly. You're essentially providing an infinite resistance in your circuit. Make sure it is connected in parallel, such that its - port is tied to the ground.
For the mechanical part, I don't think you will get any errors, though I might be more inclined to have the Torque sensor "inside" the Motion sensor block. The measurement seems more right that way.
- Sebastian

Sign in to comment.

Communities

More Answers in the  Power Electronics Control

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!