Project 1
Questions:-
Create a stateflow or Simulink model for the following flowchart.
Load the .mat file into the workspace.
The input to the model would be the power demand.
The output should be:
- Fuel cell power
- Battery power
- FC Operating state (running, standby)
Create a plot of these outputs against time.
(Note- The Simulink model file should be compulsorily attached)
Answers:-
As depicted in the preceding flowchart, there are two designated power sources: Fuel Cell (FC) and Battery.
The prescribed logic to implement involves the following conditions: if the power demand from the vehicle falls below the minimum FC power, the FC should transition to standby mode, and power must be sourced from the battery storage system. Conversely, if the power demand surpasses the minimum FC power but remains below the maximum FC power, the FC should be utilized. In cases where the power demand exceeds the maximum FC power, the Battery is designated to supply the required power.
The Simulink model has been constructed accordingly, with the minimum FC power set within the range of 0 to 1000W, the operating region of the FC spanning from 1000W to 9000W, and the maximum power demand capped at 9000W to 10000W.

The signal Builder block is used as the input to give the power demand required by the vehicle , the simulation is been run for 598 sec and the output such as FC Power , Battery Power and FC status are been studied by connecting it to the scope.
If we look inside the logic block of the Simulink the model is as shown below:-

The interval test block are used for setting the limits of the FC minimum , maximum and operation region , the limits are been set as discussed above. Then as per logic the switch block are been set and the output is been connected to FC or battery as mentioned in flowchart.
Signal Builder profile is as shown below:-

As in signal builder for 0 to 207 sec the power demand is between 0-1000w and from 207-393 sec the power demand is in between 1000-9000w and for rest of the time its above 9000w so respectively first the battery should provide the power at the same time the FC should be at standby and when the power demand is greater than min FC power than FC should be used and if the power demand exceeds max FC power than battery should be switched back.
Result scope displaying FC power , battery power, Fuel cell status and actual power demand:-

Results :-
From the results its clear that the logic which is been developed is full proof and working proper as per the logic defined. We can even see that when the FC is in operation the FC status is been showed as when its on the FC status is turned as 1 and when off its as shown 0.