## 1 Introduction  
Nowadays, the process of extracting cassava starch requires a large amount of water. This water ultimately becomes wastewater, with an amount of approximately 12 m\({}^{3}\) per ton of starch. There will be approximately 1.4 tons of solid waste. Most of the wastewater is caused by the washing and peeling processes in the rotating tank. This wastewater has a low oxygen demand (COD) [1]. However, another wastewater is produced from draining the sedimentation starch tank, which has a high COD and biochemical oxygen demand (BOD) [2]. Therefore, treating this wastewater is an important expense of cassava flour factories. Normally, the wastewater from cassava starch is commonly used to produce biogas by using the anaerobic digestion method, which produces biogas containing \(\sim\)55% CH\({}_{4}\) and \(\sim\)45% CO\({}_{2}\). Biogas with more than 50% CH\({}_{4}\) can directly produce electricity. Moreover, the biogas can also be used for transportation, but it is necessary to have a methane concentration of at least 92%, also known as biomethane [3]. The upgrading processes for CO\({}_{2}\) removal include water scrubbing, membrane separation and pressure swing absorption (PSA) [4]. It is worth mentioning that [PERSON] et al. designed the first PSA unit (GEMINI) for commercial scale upgrading of biogas. They were successful in recovering landfill gas to high purity methane, which led to a US patent in 1988 [5]. A comparison between the various upgrading technologies is summarized in Table 1. It appears that the PSA technique has a low operating cost and methane loss, which is a key factor to reduce the greenhouse gas [6]. The PSA is a well-known separation technique which uses the adsorbent and changing pressure to separate the selected gases. The amount of adsorption gas depends on the operating pressure and the equilibrium capacity of the adsorbent, including the adsorption kinetics. The first two-bed PSA process was proposed by [PERSON] [7], which consists of a four-step process and is known as the Skarstrom cycle. The core cycle consists of a pressurization step, an adsorption step, a depressurization or a blowdown step and a purge step. Many researchers have focused their studies on the steps of the PSA process and process conditions. [PERSON] et al. [8], for example, compared the counter current and co-current of a four-step process which has both adiabatic and non-adiabatic conditions. The results showed that the counter and co-current were almost the same in both conditions, but the process performance was slightly better for the adiabatic than the non-adiabatic condition [8]. [PERSON] et al. [9] later found a method which performed the best energy saving and productivity by comparing a four-step process proposed by [PERSON] [7] with five-step and six-step processes that included the rinse step and pressure equalization step. The results showed that the purity of the six-step process could be increased without a significant increase in the specific power consumption. There are a variety of widely used adsorbents to adsorb carbon dioxide in biogas, such as zeolite, a carbon molecular sieve (CMS), and activated carbon [4]. [PERSON] and [PERSON] [10] studied the performance of the CMS-3K adsorbent in a five-step process with the zeolite adsorbent in a four-step process. The results showed that both the adsorbents obtained a purity of CH\({}_{4}\) higher than 98%, but the recovery of CH\({}_{4}\) of CMS-3K was higher than zeolite, i.e., 80% compared to 60% of zeolite. Due to the microporous adsorbents, the pores on a micro- and macro-level of the CMS were distinguishable and dispersed in the pore structure. The pores at a molecular size in the CMS have provided a high kinetic selectivity and adsorption capacity for various gases [11; 12]. Therefore, the CMS is chosen in this study because it allows for a higher level of carbon dioxide diffusion in the micro-pore network than methane molecules, which have a strong resistance on the surface and inside the micro-pores of the adsorbent.