Question: Please provide matlab code with comments. table 1: 3) Consider Ohm's law: R1 = 1.22 V(SOC) = Rii(SOC) (1) i(SOC) = V(SOC) R (2) P(SOC)

Please provide matlab code with comments.
table 1:

3) Consider Ohm's law: R1 = 1.22 V(SOC) = Rii(SOC) (1) i(SOC) = V(SOC) R (2) P(SOC) = v(SOC). i(SOC) (3) Consider the data presented in Table 1 and: i) Use equation 2 to find the current function i(SOC), using the fitted V(SOC) from (a). Plot i(SOC) vs SOC. ii) Use equation 3 to find the power function P(SOC) using fitted V(SOC) from (a) and i(SOC) from (i). Plot P(SOC) vs SOC. Consider a constant-power (CP) during the entire range of SOC is needed to be 5W. Find the new current function icp(SOC) in order to have the CP over the entire range of SOC. What is the error between fitted curve and experimental results for 100%, 75%, 50% and 0%? iv) v) What would be the error if polyfit is used with order 2? Table 1 DATA = SOC 100* [O 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1]; V = [2.5 3.293 3.415 3.451 3.496 3.547 3.589 3.614 3.635 3.657 3.683 3.717 3.757 3.806 3.862 3.896 3.925 3.957 3.997 4.04 4.074 ] ; 3) Consider Ohm's law: R1 = 1.22 V(SOC) = Rii(SOC) (1) i(SOC) = V(SOC) R (2) P(SOC) = v(SOC). i(SOC) (3) Consider the data presented in Table 1 and: i) Use equation 2 to find the current function i(SOC), using the fitted V(SOC) from (a). Plot i(SOC) vs SOC. ii) Use equation 3 to find the power function P(SOC) using fitted V(SOC) from (a) and i(SOC) from (i). Plot P(SOC) vs SOC. Consider a constant-power (CP) during the entire range of SOC is needed to be 5W. Find the new current function icp(SOC) in order to have the CP over the entire range of SOC. What is the error between fitted curve and experimental results for 100%, 75%, 50% and 0%? iv) v) What would be the error if polyfit is used with order 2? Table 1 DATA = SOC 100* [O 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1]; V = [2.5 3.293 3.415 3.451 3.496 3.547 3.589 3.614 3.635 3.657 3.683 3.717 3.757 3.806 3.862 3.896 3.925 3.957 3.997 4.04 4.074 ]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
