Prev: decoding repetition code
Next: TimerFcn Callback
From: Christian Eisele on 1 Apr 2010 09:39 I am stuck on creating a simple DC-Motor in Simscape language. My code so far looks like this: component DC_mot % DC Motor inputs U = { 0, 'V' }; % n:left end nodes r = foundation.mechanical.rotational.rotational;; % r:right end parameters ke = { 0.544, 'V*s/rad' }; km = { 0.544, 'N*m/A' }; L = { 9.5e-3, 'H' }; J = { 4-3, 'kg*m^2' }; R = { 4, 'Ohm' }; end variables i = { 0, 'A' }; Me = { 0, 'N*m' }; U_ind = { 0, 'V' }; phi_p = { 0, 'rad/s' }; phi = { 0, 'rad' }; n = { 0, 'rad/s' }; end function setup across( phi_p, r.phi_p, []); through( Me, r.Me,[]); end equations U == i*R + L*i.der + U_ind; U_ind == phi*ke; Me == km*i; J*phi_p.der == Me; phi.der == phi_p; end I generate my Voltage source viag a sps + constant block and use this as the input for my model. When I then try to create the node and the through and across variables for the motor I get an error message ??No appropriate method, property, or field phi_p for class NetworkEngine.TerminalCompileData?? Any ideas what I did wrong? Thanks!
|
Pages: 1 Prev: decoding repetition code Next: TimerFcn Callback |