Simulink animation for BLDC motors

Hi my name is Beniamin and I am trying to simulate a BLDC motor design in simulink as is shown in this MathWorks video:
https://es.mathworks.com/videos/how-to-design-motor-controllers-using-simscape-electrical-part-1-simulating-back-emf-voltage-of-a-bldc-motor-1565241566392.html
When I try to animate the simulation by the function 'simulate', Matlab does not recognise it.
>> animateRotorPosition
Unrecognized function or variable 'animateRotorPosition'.
I am using a MATLAB R2019b - academic use version.
Thank you

3 Comments

Can you Share the Matlab File in 2016 version Please.
mail - sheikhsajid818@gmail.com
same think with me
what are the condition/ steps for this
>>animateRotorPosition
@Yakshraj Have you worked out the solution? same problem

Sign in to comment.

 Accepted Answer

hosein Javan
hosein Javan on 13 Aug 2020
Edited: hosein Javan on 13 Aug 2020
I didn't see anything about animate in that video. however I propose after running the simulation, save your data including time vector to workspace. then using this code you can animate the plot. for example you want to plot flux vector vs rotor position at each time sample:
n = length(time); % number of samples
% theta_r = rotor position
% psi = flux
for i=1:n
% plot your data here
plot(theta_r(i),psi(i))
drawnow
end

6 Comments

That was not the link, sorry, this is the video:
In the minute 7:10 uses a function called "animate".
I could not find information about it in the "help" bowser.
>> animateRotorPosition
Unrecognized function or variable 'animateRotorPosition
My goal is to see this animation using the simulink model described in the video.
Thank you
I have copied the script of the link and it worked
Thank you for your help
you're welcome. please don't forget to hit 'Accept'.
Actually I have the same question And I want to know why the Data Inspector icon enabled at the min 6:30 I think that's the key to open that command window
How did you get the flux output from simscape BLDC motor block?

Sign in to comment.

More Answers (1)

Categories

Find more on View and Analyze Simulation Results in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!