Loan amortization model
In this example, we will build a Colink model for the amortization of an automobile loan. At the end of each month, the loan balance b(k) is the sum of the balance at the beginning of the month [b(k-1)] and the interest for the month [ib(k)], less the end-of-month payment p(k). Thus, the balance at the end of month k is
Examining the integrand, we can see that this problem can be solved using forward Euler integration. The below figure shows the Colink model revised to use a Discrete-Time Integrator block with Integrator method set to Forward Euler. The Discrete-Time Integrator block Initial condition is set to 15,000 and Sample time to 1. Note that, in this case, the feedback gain is set to 0.01. Also note that the simulation End time must be set to 101, because the forward Euler integrator evaluates the rate at the beginning of a period.
Figure 1 colink model
Figure 2 A result from scope