How to maintain variable values between stateflow transitions
Hello,
I have a stateflow model which is modeling the State of Charge (SOC) of a battery as it cycles between charging and discharging. The stateflow diagram starts in charge and the SOC increases relative to the amount of time the charge is activated, and then the diagram transitions to discharge and the SOC decreases to relative to the amount of time the discharge state is activated. The SOC must maintain its value persisently through ‘charge’ and ‘discharge’ however everytime one cycle is completed and the stateflow transitions from discharge back to charge, SOC is reset. How do I avoid this reset? I want SOC to persist through multiple cycles and not be reset after each cycle.Hello,
I have a stateflow model which is modeling the State of Charge (SOC) of a battery as it cycles between charging and discharging. The stateflow diagram starts in charge and the SOC increases relative to the amount of time the charge is activated, and then the diagram transitions to discharge and the SOC decreases to relative to the amount of time the discharge state is activated. The SOC must maintain its value persisently through ‘charge’ and ‘discharge’ however everytime one cycle is completed and the stateflow transitions from discharge back to charge, SOC is reset. How do I avoid this reset? I want SOC to persist through multiple cycles and not be reset after each cycle. Hello,
I have a stateflow model which is modeling the State of Charge (SOC) of a battery as it cycles between charging and discharging. The stateflow diagram starts in charge and the SOC increases relative to the amount of time the charge is activated, and then the diagram transitions to discharge and the SOC decreases to relative to the amount of time the discharge state is activated. The SOC must maintain its value persisently through ‘charge’ and ‘discharge’ however everytime one cycle is completed and the stateflow transitions from discharge back to charge, SOC is reset. How do I avoid this reset? I want SOC to persist through multiple cycles and not be reset after each cycle. stateflow, variables MATLAB Answers — New Questions