View Single Post
Old 08-06-2020, 01:19 PM   #41
Second Series
Registered User
 
Second Series's Avatar
 
Join Date: May 2015
Location: Tukwila Washington
Posts: 373
Re: Mechanical speedometer drive solution

y=b^2 looks like it might fit. Although my curve goes high to low, and it does not cross the y axis. Now I’m looking at examples of how to find the equation of a curve and I keep seeing setting x to zero, or setting y to zero. My curve has no x or y intercepts. I just learned that finding an equation from a curve is called regression. So I need to find a regression model that matches this curve. I’m looking at Graphing Exponential Function on a math website. Ah, this curve displays exponential decay, so the equation might be y=b^-2. I have drawn the curve on paper, and in excel. In excel, Select the PWM/Hz column, open the insert tab, select Charts, I used Clustered column. Open chart design tab, Add chart element button, Trendline, More Trendline Options to open the Format Trendline panel. In the Format Trendline panel select the Axis Options button(looks like a bar graph), and select Power, check the box for Display equation on chart. The data from my motor, and my speedometer gives me the equation: y=45.992(x^-0.531).

I set up another spreadsheet with Hz., PWM, and PWM/Hz. and see how close this equation is to PWM/Hz.. Not as close as I like. I can change the values of the two numbers in the equation to get closer to what I need. The last column is the result from the equation minus PWM/Hz. to see the difference. Not exact, but hopefully not too far off. So now I’ll try to implement this equation in my code. 41.98*(Hz^-0.575) where Hz is the 2000ppm signal. Read the 2000ppm signal, run it through this equation, multiply the 2000ppm frequency by the result of this equation to get the PWM signal to drive the motor. Notice this dataset has 17 points, the end result will be 90 points (0 to 90mph). I need a non-linear variable multiplier to handle the variations of the motor torque at different speeds. I hope this equation works.
Attached Images
  
__________________
'47 Panel to '88 K2500 Frame Swap
Mechanical Speedometer Drive Solution
1947.2 1 ton Chevy Panel
1955.2 Chevy 6700 Bus/RV
1990 Chevy K1500
Second Series is offline   Reply With Quote