Week 6 Fuel cell powered vehicle model
Discussion of Model :

Steps : For this model, I started with a blank model in simulink. Then, I imported UDDS excel data in the command window through 'Import' button in matlab variable workspace of home window. Then, I selected that excel file and selected option of impart as 'numeric matrix'. The, UDDS data will be imported. Now, if that data contains negative values, it has to be made zero, since fuel cell can't have negative current values, since regenerative braking is not possible in it. I used the following code using for loop for the same.
for i= 1:size(UDDS)
if UDDS(i)>0
UDDS_new(i) = UDDS(i);
else
UDDS_new(i) = 0;
end
end
UDDS_new = transpose(UDDS_new);
Then, I switched back to simulink window. Then, I opened simulink library browser where chose 1D lookup table and imported it. In that, I selected number of table dimensions as '1', Data specifications as 'Table and breakpoints', Table Data as Variable name imported, breakpoint specification as 'even spacing', and first point and spacing each as '1'. Then, repeating sequence stair block is imported with vector of output values as [1:1:1370] i.e. since there as 1370 values in UDDS data and we want to fire each current value at corresponding natural number. The current values output from table lookup data is fed to 'current controlled source', which simulates the output current for fuel cell. Thus, this current controlled device is connected to fuel cell stack block from library with preset values. The measurements of this fuel cell stack is taken in bus selector block from library. In bus selector block required signals are selected. Finally, scope block is imported from library and output of bus selector is connected to scope to view the results.
Discussion of Model and Steps : As in the challenge, we have to fuel cell stack model using UDDS data which gives us reference speed, but the problem in this is that UDDS is a drive cycle which is used for testing of vehicles (emissions, efficiency, etc....) and thus this data is speed vs time. So, either we can simulate whole vehicle in MATLAB or can take current data corresponding to UDDS data. Here, for simplicity of model second approach is being followed. Now, first this data is being imported in MATLAB as a matrix through "Import Variable" command in MATLAB. So, by selecting just the current values it will be imported as a 1370 x 1 matrix. Then, we will open simulink and use lookup table block along with repeating stair sequence block to extract this data. In lookup table block, we will select the imported variable as table data and breakpoints as even spacing data range in with space 1 and starting from 1. Thus, it will assign a natural numbers from 1 as breakpoints. Now, thus, it has become a 2D array where on giving it an input of natural number from 1 to 1370, it will output the assigned value at that breakpoint. To give it a trigger, we use a repeated stair sequence block. In that we will assign it a sequence of natural numbers from 1 to 1370 and connect it to the input of lookup table. Now, at each sample time, it will trigger a nautral number from 1 to 1370 to lookup table which will further output the corresponding assigned value. Now, the output of lookup table will be input signal to a controlled current source. Now, we will connect this to the terminals of fuel cell which will then simulate the same conditions as that of UDDS. The output terminals of battery is connected to bus selector which is further connected to scope terminals to see the results. Also, the default Powergui block for these kind of systems is used. Thus, we will get the data.
Discussion of Results :


Now, in this as we can see from results current varies in continuous fashion due to interpolation performed by lookup table. We can see from the plot, that when there is increase in current, likewise there is decrease in voltage of fuel cell stack due to power delivery. Now, when there is current cosumption, it also leads to increase in stack consumption, thus we can see rise in all the lpm unit graphs. But, it detoriate efficiency a bit which is relative to low heating value of water. The utilization percentage will remain same since there is no huge draw of current from the stack. The interesting thing to note is the time period during zero current in between. Since, there is no current draw but fuel cell process is taking place of the already activated chemical reactions, it will have zero efficiency as well as zero utilization percentage. Again, when current is drawn, efficiency comes back to normal.