WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

Simscape Translationsfeder mit Dehnung als Input

 

Bolla
Forum-Newbie

Forum-Newbie


Beiträge: 5
Anmeldedatum: 05.06.17
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 11.08.2017, 11:29     Titel: Simscape Translationsfeder mit Dehnung als Input
  Antworten mit Zitat      
Hi Leute,

ich versuche gerade ein System zu erstellen, indem ich drei mechanische Federn miteinander kopple (siehe Bild). Das System ist durch Referenzknoten beschränkt. Eine Feder soll dabei die Ausdehnung als Input bereitstellen und sich näherungsweise ideal steif verhalten (sehr großes k). Die anderen beiden Federn sollten dann ihrer Federsteifigkeit entsprechend eine Stauchung vollführen und sich im Kräftegleichgewicht befinden. Nun ist die Frage, wie ich diese variabel ausdehnbare Feder den Programmiere.
Ich erhalte für meinen Code immer die bekannte Fehlermeldung:"The number of equations exceeds the number of continuous
variables. The component only defines 5 variables, but 6 equations."
Anbei der Code. Vielen Dank für eure Rückmeldungen.

Code:

component spring_variable
% Translational Spring
% The block represents an ideal mechanical linear spring.
%
% Connections R and C are mechanical translational conserving ports.
% The block positive direction is from port R to port C. This means that
% the force is positive if it acts in the direction from R to C.

% Copyright 2005-2016 The MathWorks, Inc.

inputs
    s = { 0, 'm' }; % S:bottom
end

parameters
    spr_rate = { 1000, 'N/m' };  % Spring rate
end

variables
    f = { 0, 'N' };         % Force
    v = { 0, 'm/s'};      % Velocity
end

equations
    assert(spr_rate>0)
    v == x.der;
    f == spr_rate * s;
end

end








 
Private Nachricht senden Benutzer-Profile anzeigen


boundary
Forum-Anfänger

Forum-Anfänger


Beiträge: 41
Anmeldedatum: 15.12.15
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 11.08.2017, 22:33     Titel:
  Antworten mit Zitat      
Code:

component spring_variable
% Translational Spring
% The block represents an ideal mechanical linear spring.
%
% Connections R and C are mechanical translational conserving ports.
% The block positive direction is from port R to port C. This means that
% the force is positive if it acts in the direction from R to C.

% Copyright 2005-2016 The MathWorks, Inc.

inputs
    s = { 0, 'm' }; % S:bottom
end

parameters
    spr_rate = { 1000, 'N/m' };  % Spring rate
end

variables
    f = { 0, 'N' };         % Force
    v = { 0, 'm/s'};      % Velocity
end

equations
let
    assert(spr_rate>0)
in
   v == x.der;
    f == spr_rate * s;
end

end
 


Probier das mal so aus, ich habe zurzeit leider keinen Rechner mit Simscape.
Private Nachricht senden Benutzer-Profile anzeigen
 
Bolla
Themenstarter

Forum-Newbie

Forum-Newbie


Beiträge: 5
Anmeldedatum: 05.06.17
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 13.08.2017, 09:10     Titel:
  Antworten mit Zitat      
Vielen Dank für deine Antwort,

leider funktioniert es so auch nicht, Matlab wirft wieder einen Fehler mit deinem Code.

Error: Line 27 Column: 5 Unexpected MATLAB operator.
Private Nachricht senden Benutzer-Profile anzeigen
 
boundary
Forum-Anfänger

Forum-Anfänger


Beiträge: 41
Anmeldedatum: 15.12.15
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 13.08.2017, 11:46     Titel:
  Antworten mit Zitat      
Code:
component spring_variable
% Translational Spring
% The block represents an ideal mechanical linear spring.
%
% Connections R and C are mechanical translational conserving ports.
% The block positive direction is from port R to port C. This means that
% the force is positive if it acts in the direction from R to C.

% Copyright 2005-2016 The MathWorks, Inc.

inputs
    s = { 0, 'm' }; % S:bottom
end

parameters
    spr_rate = { 1000, 'N/m' };  % Spring rate
end

variables
    f = { 0, 'N' };         % Force
    v = { 0, 'm/s'};      % Velocity
end

equations
    let
       assert(spr_rate>0)
    in
       v == x.der;
       f == spr_rate * s;
    end
end

end
 


habe ein
Code:
vergessen Smile
Private Nachricht senden Benutzer-Profile anzeigen
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum nicht posten
Du kannst Dateien in diesem Forum nicht herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.