# modeling a electrical pulse which is technically time dependent

I have an electrical pulse that I need to fit a curve to a certain area of but not the entire thing. The whole pulse looks like this

However the only part that I need to model is this

My boss and I are trying to understand the behavior of this particular region of the curve. So, I need to fit an equation to it. As you can see the circles are the observed data. The blue line is the idealize data and the red line is the

 lines(df3_200\$Time,predict(fit3_df_200,data.frame(x=df3_200)),col="red", lwd="2")


I have the residuals and the coefficients

Call:
lm(formula = y_100 ~ poly(x_100, 3, raw = TRUE))

Residuals:
Min       1Q   Median       3Q      Max
-2080.10  -372.44   -40.37   342.17  1412.65

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)                 -2.030e+06  7.050e+04  -28.79   <2e-16 ***
poly(x_100, 3, raw = TRUE)1  1.424e+04  5.196e+02   27.40   <2e-16 ***
poly(x_100, 3, raw = TRUE)2 -3.327e+01  1.272e+00  -26.17   <2e-16 ***
poly(x_100, 3, raw = TRUE)3  2.590e-02  1.034e-03   25.06   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 584.6 on 296 degrees of freedom
Multiple R-squared:  0.9627,    Adjusted R-squared:  0.9623
F-statistic:  2547 on 3 and 296 DF,  p-value: < 2.2e-16

> coef(fit3_df_200)
(Intercept) poly(x_200, 3, raw = TRUE)1
-2.733113e+06                1.914600e+04
poly(x_200, 3, raw = TRUE)2 poly(x_200, 3, raw = TRUE)3
-4.467164e+01                3.469908e-02


can I use this information to contruct the curve, or am I way off?

I would think that its no different than an max/min problem in Calc, but its been awhile. THanks for any information that you can provide.

Current

• Can you describe what exactly you're trying to "understand"? It looks like you want to parameterize the pulse, if so, what led you to choose the model you did? – CFD Feb 17 '20 at 15:53
• This square wave is generated using a bunch of different components, like mosFETs, caps, and conductors. at the end of the pulse the part we want to model you can see that the pulse slowly returns to zero. It should do that more quickly also there is a dip between 350 and 400 milsecs. WE think there is a parasitic in the model that is not accounted for like a cap or inductor that is preventing it from returning to zero quick enough. caps have an equation as seen here electronics-tutorials.ws/capacitor/cap_1.html – alittleloopy Feb 17 '20 at 16:16
• @CFD Sorry I did not answer you question. I am not really sure what I should use. Technically, it is a time series because it happens over time. But the voltage of the pulse is dependent upon the current moving through the system which is not represented here. The pulse only happens once. The only part that needs to be modeled in the tail nothing else.Do I consider it non-stationary time series? An engineer mentioned random walk while thinking out loud.My job is just write the code that gets them the desired results, they will do the interpretation. But I have to be smarter than the machine – alittleloopy Feb 17 '20 at 20:08
• I think what I'm reading from your first comment is that you might be trying to use a capacitor equation to solve such that the resulting parameters may point to an unaccounted for capacitance in the circuit? As for your second comment, is it possible to get a current trace as well? – CFD Feb 18 '20 at 16:38
• I added the current component. I don't want to make any statistical inferences about the curve just form an equation about the area in question. Is there an R package for that? I am not familiar enough with Mathematica or MatLab to use those. We are a small startup of three people, and I know enough R to be dangerous and my boss hates Excel with a passion. LOL – alittleloopy Feb 19 '20 at 1:11