(Ideal Rotational Motion Sensor) Number of variables exceeds the number of equations
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a problem with the ideal rotational motion sensor, the code is raising an error as the following
Error compiling Simscape network for model Hw7.
Caused by:
Number of variables exceeds number of equations. Click on any Simscape blocks identified below for more detailed diagnostics.
- Hw7/Subsystem/Ideal Rotational Motion Sensor
- Hw7/Subsystem1/Ideal Rotational Motion Sensor
- Hw7/Subsystem2/Ideal Rotational Motion Sensor
component angular_velocity
% Ideal Rotational Motion Sensor
nodes
R = foundation.mechanical.rotational.rotational; % R:left
C = foundation.mechanical.rotational.rotational; % C:right
end
outputs
W = { 0, 'rad/s' }; % W:right
A = { 0, 'rad' }; % A:right
end
parameters
wrap_angle = simscape.enum.onoff.off; % Wrap angle to [0, 2*pi]
% 0 - Off
% 1 - On
offset = { 0, 'rad' }; % Initial angle
end
variables(Access = private)
phi = {value = offset, priority = priority.high}; % Angle
end
if wrap_angle == simscape.enum.onoff.on
equations
A == mod(phi, {2*pi, 'rad'});
end
else % wrap_angle == simscape.enum.onoff.off
equations
A == phi;
end
end
equations
phi.der == W;
W == R.w - C.w;
end
end
2 Commenti
Athrey Ranjith Krishnanunni
il 18 Gen 2021
Please attach a screenshot of the model so that we know where the error is coming from.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Discrete Events and Mode Charts in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!