PMLSM Modeling cogging forces
Show older comments
Is there a way to modify the PMLSM Simscape block so that it accurately models cogging forces?
Answers (1)
Aditya
on 17 Dec 2025
Hi John ,
The built-in PMLSM (Permanent Magnet Linear Synchronous Machine) block in Simscape does not natively model cogging forces. However, you can extend its behavior by adding a custom force component to represent cogging.How to Model Cogging Force in Simscape
1. Use an External Force Source
- Add a Simscape "Translational Force Source" block to your mechanical translational network.
- Connect the force source in series with the mover of the PMLSM.
- Drive the force input of the source with a function that models the cogging force as a function of mover position.
2.Custom Simscape Component
If you want to encapsulate this in a single block, you can write a custom Simscape component using the Simscape language.Sample code :
component CoggingForce
nodes
p = foundation.mechanical.translational.translational; % positive
c = foundation.mechanical.translational.translational; % case
end
parameters
A = {1, 'N'}; % amplitude
Np = 6; % number of periods
tau = {0.01, 'm'}; % pole pitch
end
variables
x = {0, 'm'}; % position
F = {0, 'N'}; % force
end
equations
x == p.x - c.x;
F == A * sin(Np * 2*pi*x/tau);
p.f + F == 0;
c.f - F == 0;
end
end
- Connect this block in series with the mover port of the PMLSM.
You can refer to the following documentation for more details:
https://www.mathworks.com/help/simscape/lang/creating-custom-components.html
Categories
Find more on Magnetic Elements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!