[Reddit Cross Post] Connect Simulink signal to Electrical (Simscape) signal
    28 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Toshiaki Takeuchi
    
 el 15 de Oct. de 2025 a las 17:19
  
    
    
    
    
    Respondida: Neal
 el 16 de Oct. de 2025 a las 6:42
            I need to use a signal generated in a Simulink subsystem and output its voltage to Simscape Electrical model.
While I know how to convert Simscape signals to Simulink (using a sensor and the PS-Simulink Converter), I'm stuck doing the reverse.
What is the standard method for converting a Simulink signal into the Simscape Electrical domain to control a source? The Simulink-PS Converter block doesn't seem to connect directly to the control port of the electrical sources.
Is this a practical approach for integrating two large, existing systems? Any examples would be great.

0 comentarios
Respuestas (1)
  Neal
 el 16 de Oct. de 2025 a las 6:42
        Hi Toshiaki,
This might be bit of a convoluted way, since I haven't actually spent any time trying out other ways. But off the top of my head you could write out your simulink signal to your workspace as a variable (this might be a challenge as the block "to Workspace" only writes after the simulation has ended or paused, alternatively you could try a matlab function block with "assignin" function, I donot know if it writes after every sample time or at the end of the simulation) and then parameterise your simscape electrical source to accept that variable as its amplitude. 
Good luck.
0 comentarios
Ver también
Categorías
				Más información sobre Electrical Sensors en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

