Challenge

Project 1

Flow chart:
                                          

  • The parameters required to simulate the above algorithm are maximum fuel cell power and minimum fuel cell power.
  • MAX_FC_Power=90 kW and MIN_FC_Power=50 kW, which are defined in workspace.
  • Input is the power demand from the vehicle which is given by a signal builder block.
  • Its also assumed that when the power demand is greate than the maximum power of fuel cell then battery also supply power to the vehicle which is equal to (power demand - MAX_FC_Power).
  • Its also assumed that battery rating is greater than minimum fuel cell power.
  • Outputs are fuel cell operating state, Battery power, Fuel cell power.
  • Fuel cell operating state =1 indicates FCS is ON and fuel cell operating state=0 indicates FCS in on standby.

Input: Power demand
                      

SIMULINK MODEL:
             

LOGIC:
                          

 design steps:

  • Input (power demand) goes to the default transition block as highlighted below.
  • Here the power demand is compared with minimum fuel cell power. At starting since the power demand is less than min FC power, the follow transition accurs as highlighted below.

    and then enter to FCS_operation state

    The above state is coded to make FCS operating state =0 since at power demand less than given min FCS power only battery supplied the load and FC power to 0 as FC do not supply any power. And the battery power will be the power demand itself till power demand goes above min FC power.  (BatteryPower=PD).
  • Then a default (no condition) transition occurs and enters Battery state during which Battery power will be equal to Powed demand (PD).
    make sure u write the code in under 'during' so that till power demand is greater than min FC power, BatteryPower=PD will go on executing till the state exits.

  • As and when power demand is greater than min FC power, the coomand goes to default block.

  • Here since the power demand is above min FC power, transition 2 becomes true and enters FCS operation state as shown below.

  • The command stays in this state till the power demand goes above max FC power. 'during' this state FCS operationState =1 (as FC will now deliver power), FC Power= power demand, battery power=0 (when the power demand is between min FC power and max FC power, only FC will supply the load and Battery will not supply any load).
  • When power demand goes above max FC power the command enters to Battery1 state, 'during' which both battery and FC will supply the load. And battery power= power demand - max FC power.

  • From the input power demand we can observe that the power demand decreases from its maximum power demand greater than max FC power. Now the power enter into region where power demand is in between min and max FC powers, so it needs to be in the FCS operation block. Which is donw by using below transition.

  • Power demand now goes below min FC power where only battery needs to supply load. this can be achieved by transition 2 of FC operation state.



  • And again the inital steps are repated where the power demand is less than min FC power and goes on like the intial steps mentioned above.
  • The stateflow logic react to the changes in the power demand and reacts accordingly.

Outputs:

  • FC_OperatingState

    When ever the power demand is less than min FC power, FC is on standby otherwise it is running.
  • FC_Power

    FC_power follows the power demand when power demand is greater than min FC power and its power is constant at max FC power when power demand goes above max FC power which can be seen above.
  • BatteryPower:

    Battery operaters when power demand is less than the min FC power and when power demand demand goes above the max FC power. Otherwise, battery do not supply any power.
  • When to add the Battery power and FC power plot we get the input power demand plot.

From above plot we can conclude that battery and FC are working hand in hand in supplying power to the load as per the power demand and given logic in flowchart is implemented successfully.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.