-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi,
I am trying to use simscape-battery-library to run EIS simulations, by applying a sinusoidal current and measuring the responding voltage, from which I can extract impedance measurements.
- Suppose that I am trying to use TSPMe, and in the following code how can I input sine input "appCurr".
import BatteryLibrary.Utilities.*
simuLinkMdlStr = 'TSPMe_Prototype'; % Specify the simulink file name (without the file extension)
load_system(simuLinkMdlStr+".slx")
set_param(simuLinkMdlStr,'SimscapeUseOperatingPoints','off');
Vmax = 4.2; % Set upper cut-off voltage [V]
Vmin = 2.5; % Set lower cut-off voltage for terminating discharge [V]
modelProp = Simulink.SimulationInput(simuLinkMdlStr); % Create an instance of a Matlab SimulationInput class to simulate
appCurr = -5*timeseries(1,0,'Name',"I"); % Generate 1C input current as a timeseries object (1C := 5A) [A]
modelProp = modelProp.setExternalInput('appCurr'); % Set the external input to the model
- In order to calculate impedance for EIS, how we can extract current and voltage entries from the Matlab code?
Hope someone will help me in this regard.