Before I say anything, I am trying to model this based on your first picture, annotated like this:
You say nothing about the first dip (at the first dotted red line), time or value. You also say nothing about the apparent time constant of the underlying curve (seems like a 1st order); the same for the decaying curve. It's not clear what is the hold time, when it should happen, relative to what. So my assumptions are:
- it's a 1st order exponential, both the rising and the falling ones, just different time constants;
- the first dip is arbitrarily chosen to happen at an arbitrary threshold;
- the second rising curve is a continuation of the initial one, which simplifies the design with one RC time constant, only (for the rising part);
- the hold time lasts for
5 ms
after reaching ~99.9%
of the final value;
- the decaying curve is not exactly an RC curve, to simplify the design.
With these in mind, if @jonk's or @Ste Kulov's suggestions are not enough, here's a quick'n'dirty attempt:
R1, C1
form an RC time constant that make up the rising curve. R1
is 1 kΩ to keep the current through it from influencing too much the overall result. If this is undesirable, buffer the RC with a VCVS.
Since the input voltage is from 0 to 12 V, the gain of G1
, the "front-end", is set to 3.2/12=0.2667
, to match the maximum value of 3.2 A
.
The threshold for the first dip is chosen at 4 V
(corresponding to a current of 3.2*4/12=1.0667 A
), when the SR latch A1
turns on. Its output has a time constant which affects S2
's transit time, gradually discharging the capacitor, causing the dip to form. Increase or decrease to set the length of the dip's falling edge. S2
has a threshold of 0.5 V and a negative(!) hysteresis of -0.5 V, which means that the whole transition from 0 to 1 of A1
is affecting S2
.
S1
takes over at vt=-0.68
, relative to A1
's output. It's negative because it's meant to start ON and go OFF when active. Its threshold is small and sets the sharpness of the dip. It's best to not make it impossibly low, or even zero, because the lower the value, the higher the internal gain, which can cause "hiccups"; help your local friendly solver, not hinder it. At this point the second rising curve starts.
When the voltage reaches 11.99 V
(corresponding to 3.197333 A
; be careful with precision, it's not unlimited), the Schmitt trigger A2
turns on and its output has a time constnat of 5 ms
. This, in turn, controls S3
, whose threshold is -0.693 V
, to match the time the output of A2
reaches 0.5 V
. S3
's hysteresis is, again, small enough, setting the decaying curve's shape. It's not exactly an exp(-t)
curve, but it's CloseEnough®™.
S3
acts as an output shunt resistor for G2
, and it starts OFF, when roff=1
, which means unity gain. When it's ON, ron=40.625m
which is 0.13/3.2
, the ratio between the hold value and the inrush current.
While it works, it may be a one time deal, since it relies on a latch. It's also triggered by a step input, so no guarantees how it behaves for a ramp, for example, or any other waveform; negative values may cause havoc. If needed, a reset can be provided, either manually (external, or internal), or automatically, at a certain threshold of the hold current, after it has been reached, or after some time has passed (use the equivalent of the A2
, for example). The whole circuit activates with the applied voltage, so as long as there is no voltage, no current should be drawn.
Ron
to1m
. \$\endgroup\$