Example

 

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

 

 

Where r=i+1, and I is the monthly interest rate.

Assume that the initial loan balance is $15,000, the interest rate is 1% per month (12% annual interest), and the monthly payment is $200. Compute the loan balance after 100 payments.

The below figure shows a Colink model of this system. The Unit Delay block computes b(k-1). The Unit Dely block Initial conditions is the initial loan balance (15,000). The Unit Delay block Sample time is set to 1. Set solver type to Fixed-Step, discrete (no continuous states), and let End time be 101. After running the simulation, the Scope block shows the ending balance.

 

Figure 1  colink model

 

Figure 2  A result from scope