This paper addresses the problem of generating a neural-network based virtual sensor particularly in circumstances where the available information is insufficient to train a neural network. An approach is proposed that involves the modeling of an alternative relationship and an a priori knowledge from which the unmeasured variable may be determined. To effect this, a recurrent neural network is trained that predicts a measurable variable. Furthermore, a mathematical relationship that determines the unmeasured variable based on the prediction and a knowledge from the physical insight is established. The extended Kalman filter (EKF) is adopted to estimate the unmeasured variable on-line. A simulation model of a process analyzer, whose purpose is to estimate ammonium concentration in wastewater, is considered to demonstrate the approach. The estimation of the ammonium concentration is based on the prediction error between the output of an off-line trained recurrent network and a measured ammonia concentration. Furthermore, a knowledge about the relationship between the unmeasured and measured input variables with regard to their effect on the output variable is incorporated in the estimation algorithm. A calibration procedure is carried out to gain training data for the neural network.